#!/usr/bin/env python
# -*- coding:utf-8 -*-
# @time: 2024/5/6 11:22
# @Author : Admin

class TestCase:
    TCName = ""
    TCSummary = ""
    TCPrecondition = ""
    TCAction = ""
    TCResult = ""
    TCMode = ""

    def __init__(self, id=0, stepsId=0, TCName="", TCSummary="", TCPrecondition="", TCAction="", TCResult="", TCMode=""):
        self.TCName = TCName
        self.TCSummary = TCSummary
        self.TCPrecondition = TCPrecondition
        self.TCAction = TCAction
        self.TCResult = TCResult
        self.TCMode = TCMode
        self.id = id  # 禅道上用例的ID
        self.stepsId = stepsId  # 禅道上用例第一个steps的ID

    def compareTo(self, testcase):
        test_Cnt = 0

        if not self.TCName == testcase.TCName:
            test_Cnt = test_Cnt+1
        if not self.TCSummary == testcase.TCSummary:
            test_Cnt = test_Cnt + 1
        if not self.TCAction == testcase.TCAction:
            test_Cnt = test_Cnt + 1
        if not self.TCResult == testcase.TCResult:
            test_Cnt = test_Cnt + 1
        if test_Cnt == 0:
            return True
        else:
            return False



